var tmp = []
while (tmp.length != 30) {
    var j = Math.floor(Math.random() * 30) + 1
    if (tmp.indexOf(j) == -1) tmp.push(j)
}
console.log(tmp)